//
//  AttentionCell.m
//  PropertyMananger
//
//  Created by bh on 16/12/29.
//  Copyright © 2016年 BH. All rights reserved.
//

#import "AttentionCell.h"

@implementation AttentionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];


}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.iconImg = [[UIImageView alloc]init];
        [self addSubview:self.iconImg];
    //    self.iconImg.image = IMG(@"ico_mail_list_property");
        
        [self.iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self).with.offset(15);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(40, 40));
        }];
        
        //title
        self.nameLabel = [[UILabel alloc]init];
        [self addSubview:self.nameLabel];
    //    self.nameLabel.backgroundColor = BHRandColor;
        
        self.nameLabel.textColor = [UIColor blackColor];
        self.nameLabel.textAlignment = NSTextAlignmentLeft;
        self.nameLabel.font = BHFont(15);
        [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.iconImg.mas_trailing).with.offset(15);
            make.top.equalTo(self.iconImg).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(BHscreenW - 80, 25));
        }];
        
        //subtitle
        self.subtitle = [[UILabel alloc]init];
        [self addSubview:self.subtitle];
        
        self.subtitle.textColor = [UIColor grayColor];
        self.subtitle.textAlignment = NSTextAlignmentLeft;
        self.subtitle.font = BHFont(13);
      //  self.subtitle.backgroundColor = BHRandColor;

        [self.subtitle mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.nameLabel).with.offset(0);
            make.top.equalTo(self.nameLabel.mas_bottom).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(BHscreenW - 80, 25));
        }];
                
        
    }
    return self;
}

@end
